#pragma once
#include <iostream>
#include <fstream>
#include <istream>
#include <string>
#include <sstream>
#include <vector>
#define DELETE(i)			{if(i) {	delete(i);		(i)= NULL;}}
#define DELETE_ARRAY(p)		{ if (p) {	delete[] (p);   (p)=NULL; } }

using std::vector;
using std::cout;
using std::cin;
using std::stringstream;
using std::string;
using std::endl;
using std::ifstream;
using std::ofstream;

//global statics
const static string LINE			=	"-----------------------------------------------------";
const static string TITLE			=	"- MapSolver application developed by Marcus Belcher -";
const static string EXIT			=	"Exiting Application";
const static string PROCESS			=	"Processing file: ";
const static string SYS_ERR			=	"System Error: Cannot Initionalize filehandler";
const static string FileName_ERR	=	"File name error: Cannot read/find file";
const static string Map_ERR			=	"Map Error: Failed to initionalize";
const static int	MAX_FILENAME_SIZE=	20;
const static bool	DEBUG_PRINT		=	false;


//error codes
const static int	DataSystemError	= 999999;
const static int	FileNameError	= 999998;
const static int	MapError		= 999997;

template <typename E> 
inline bool checkVectorForValue(vector<E> &vec, const E value){
	for(unsigned int i = 0; i < vec.size();i++){
		if(vec.at(i) == value)return true;
	}
	return false;
}

template <typename E> 
inline int getVectorPosition(vector<E> &vec, const E value){
	for(unsigned int i = 0; i < vec.size();i++){
		if(vec.at(i) == value)return i;
	}
	return GRID_MAX_VAL;
}
